package org.ccay.demo.grid.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.ccay.core.base.PageVO;
import org.ccay.core.base.PagedResult;
import org.ccay.core.exception.ApplicationException;
import org.ccay.demo.grid.vo.GridVO;

/**
 * 
 * IGrid测试Dao接口
 */
public interface IGridDao {
	/**
	 * 通过条件查询信息
	 * @param queryDemo
	 * @param pageVO
	 * @return
	 */
	public PagedResult<GridVO> findPagedDemoList(GridVO queryGrid, PageVO pageVO);
	
	/**
	 * 通过条件查询信息
	 * @param queryDemo
	 * @param pageVO
	 * @return
	 */
	public PagedResult<GridVO> findRangeDemoList(GridVO queryGrid, PageVO pageVO);
	
	/**
	 * 滚动分页	
	 * @param queryGrid
	 * @param pageVO
	 * @param totalRows
	 * @return
	 */
	public PagedResult<GridVO> findRangedDemoList(GridVO queryGrid, PageVO pageVO, @Param("sort") String taxis, @Param("totalRows") int totalRows);
	/**
	 * 增加数据
	 * @param newGrid
	 * @throws ApplicationException
	 */
	public void createDemo(GridVO newGrid) throws ApplicationException;
	
	/**
	 * 批量增加数据
	 * @param newGrids
	 * @throws ApplicationException
	 */
	public void createDemos(List<GridVO> newGrids) throws ApplicationException;
	
	/**
	 * 批量删除数据
	 * @param existedGrids
	 * @throws ApplicationException
	 */
	public void deleteDemos(List<GridVO> existedGrids) throws ApplicationException;
	
	/**
	 * 批量修改数据
	 * @param existedGrids
	 * @throws ApplicationException
	 */
	public void updateDemos(List<GridVO> existedGrids) throws ApplicationException;
}
